package com.xfhy.wallpaperdemo.live;

import android.content.Context;
import android.content.Intent;

import com.vi.daemon.DaemonNative;
import com.xfhy.wallpaperdemo.DaemonLog;

public class ServiceUtils {
    public static void startService(Context context, Class cls) {
        try {
            context.startService(new Intent(context, cls));
        } catch (Throwable th) {
            DaemonLog.e("startService error,clz=" + cls.getSimpleName());
            if (th instanceof IllegalStateException) {
                DaemonNative.restartProcess();
            }
        }
    }
}
